/*
* ===================================================
*
*       Filename:  calloc.c
*
*
*        Created:  10/15/2011 11:13:51 PM
*       Revision:  none
*       Compiler:  gcc
*
*         Author:  durand_y, <durand.yoan@gmail.com>
*
* ===================================================
*/
#include "malloc.h"

void        *calloc(size_t  nmemb,
                    size_t  size)
{
    char    *s = NULL;

    if ((nmemb != 0) && (size != 0))
    {
        s = malloc(size * nmemb * sizeof (char));
        for (size_t i = 0; i < (size * nmemb); i++)
            s[i] = '\0';
        return (s);
    }
    else
        return (NULL);
}
